package com.carol.lmsbe.entity;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import java.math.BigDecimal;
import java.time.LocalDateTime;

/**
 * 设备维修实体类
 */
@Data
@TableName("equipment_repair")
public class EquipmentRepair {

    @TableId(type = IdType.AUTO)
    private Long id;

    @TableField("equipment_id")
    private Long equipmentId;

    @TableField("repair_date")
    private java.time.LocalDate repairDate;

    @TableField("problem_description")
    private String problemDescription;

    @TableField("repair_company")
    private String repairCompany;

    @TableField("repair_cost")
    private BigDecimal repairCost;

    @TableField("responsible_person")
    private String responsiblePerson;

    @TableField("repair_result")
    private String repairResult;

    @TableField("status")
    private String status; // REPAIRING-维修中, COMPLETED-已完成, FAILED-维修失败

    @TableField("remark")
    private String remark;

    @TableField(value = "create_time", fill = FieldFill.INSERT)
    private LocalDateTime createTime;

    @TableField(value = "update_time", fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;
}
